<?php
function callback($buffer) {
    return preg_replace('/\s+/', ' ', $buffer);
}
ob_start("callback");
?>
<div style="background: #54300E; height:20px;margin-bottom:10px;color:#FFF;padding:5px;"><?php echo $this->catName;?></div>
<div style="padding:5px;">
    <div id="leftmenucontent">
    <?php
    $children = $this->child;
    if(count($children) > 0) {
    ?>
    <ol>
    <?php
        foreach($children as $child):
    ?>
        <li style="padding-bottom:3px;">
            <a rel="<?php echo $child->category_id;?>" class="detailleft"><?php echo $child->admin_title;?></a>
        </li>
    <?php
        endforeach; // child
    ?>
    </ol>
    <?php
    } // if count child
    ?>
    </div>
        <div id="box" style="display:none;" class="mbcontentcls content<?php echo $child->category_id;?>" >
            <div class="lightBox" style="vertical-align: middle"> </div>
            <div class="containerPlus resizable {width:640, height:480, skin:'white'}" >
                <div class="no"><div class="ne"><div class="n" style="border-bottom:1px solid #000;"><?php echo $this->catName;?></div></div>
                    <div class="o"><div class="e"><div class="c">
                        <div class="mbcontainercontent">
                        </div>
                    </div></div></div>
                    <div >
                        <div class="so"><div class="se"><div class="s"></div></div></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script type="text/javascript">
    $('.detailleft').click(function (event) {
        var id = $(this).attr('rel');
        $('.mbcontainercontent').html('Đang nạp dữ liệu');
        $.ajax({
            url: '<?php echo BASE_PATH?>/index/index/detail-content/id/' + id,
            cache: false,
            success: function(html){
                var objContent = $(".mbcontainercontent");
                objContent.slideUp(500, function() {
                	objContent.html(html);
                });
                objContent.slideDown(500);
            }
          });
        $('#box').fadeIn();
    });
</script>
<?php
ob_end_flush();
?>